const router = require('koa-router')()

router.prefix('/users')

router.get('/', function (ctx, next) {
  ctx.body = 'this is a users response!'
})

router.get('/bar', function (ctx, next) {
  ctx.body = 'this is a users/bar response'
})
router.get('/list', function (ctx, next) {
  ctx.body = [{
    id: 1,
    name: 'zhangsan',
    age: 18
  }, {
    id: 2,
    name: 'lisi',
    age: 20
  },
  {
    id: 3,
    name: 'wangwu',
    age: 22
  }
  ]
})

module.exports = router
